package com.situ.day12Pingfang;

import java.util.Scanner;

public class Money {
	public void yuE() throws MoneyException {
		int balance = 10;
		Scanner scanner = new Scanner(System.in);
		System.out.println("请输入存款金额");
		int cunKuan = scanner.nextInt();
		int yuE = 0;
		yuE = cunKuan + yuE;
		System.out.println("请输入取款金额");
		int quKuan = scanner.nextInt();
		int minBalance = yuE - quKuan;
		if (minBalance >= balance) {
			System.out.println(minBalance);
		}else {
			throw new MoneyException(quKuan);
		}
	}
}
